module FeaturesHelper
	def feature_link(feature)
		object = feature.featureable
		case feature.featureable_type
			when	"Community"
				link_to object.title, community_path(object)
			when "Post"
				link_to object.title, user_post_path(object.user, object)
			when "User"
				link_to object.login, user_path(object.user, object)
			when "Article"
				#link_to object.title, category_article_path(object.category, object)
				link_to object.title, object.category ? category_article_path(object.category, object) : article_path(object)
		end
	end
end
